﻿
using Mes.Domain.BoundedContext;

namespace Mes.Application.DTO.Inputs.Operations
{
    public class StdOperCommon
    {
        public string Oper_Id { get; set; } = string.Empty;

        public string? Oper_Desc { get; set; } = null;

        public string? Oper_Type { get; set; } = null;

        public double? Oper_Cost { get; set; } = null;

        public string? Notes { get; set; } = null;
    }

    public class StdOperInput : StdOperCommon
    {
        public List<StdOperEntLinkInput> StdOperEntLinks { get; set; }

        public List<StdOperAttrInput> StdOperAttrs { get; set; }

        public List<StdOperStepGrpInput> StdOperStepGrps { get; set; }
    }

    public class StdOperEntLinkInput
    {
        public int Ent_Id { get; set; } = -1;

        public double Est_Prod_Rate { get; set; } = 0.0;

        public double? Est_Lab_Rate { get; set; } = null;

        public double? Est_Setup_Time { get; set; } = null;

        public double? Est_Teardown_Time { get; set; } = null;

        public double? Est_Transfer_Time { get; set; } = null;
    }

    public class StdOperAttrInput
    {
        public int Attr_Id { get; set; } = -1;

        public string? Attr_Value { get; set; } = null;

        public string? Notes { get; set; } = null;

        public string? Last_Edit_Comment { get; set; } = null;
    }

    public class StdOperStepGrpCommon
    {
        public int Step_Grp_Id { get; set; } = 0;

        public string Step_Grp_Desc { get; set; } = string.Empty;

        public int Step_Grp_Seq { get; set; } = 0;

        public string? Last_Edit_Comment { get; set; } = null;
    }
    public class StdOperStepGrpInput : StdOperStepGrpCommon
    {
        public List<StdOperStepInput> StdOperSteps { get; set; }
    }

    public class StdOperStepInput
    {
        public int Step_No { get; set; } = 0;

        public int Step_Seq { get; set; } = 0;

        public string? Step_Name { get; set; } = null;

        public string Step_Desc { get; set; } = string.Empty;

        public string? Last_Edit_Comment { get; set; } = null;
    }

    public class StdOperUpdateInput : StdOperInput
    {
       
    }

    public class StdOperPageInput
    {
        public string Oper_Id { get; set; } = string.Empty;

        public PagedInput PagedInput { get; set; }
    }
}
